gempy.core.data.OrientationsTable¶
- class gempy.core.data.OrientationsTable(data: ndarray, name_id_map: dict[str, int] | None = None, _model_transform: Transform | None = None)[source]¶
A dataclass to represent a table of orientations in a geological model.
Methods
__init__
(data[, name_id_map, _model_transform])empty_orientation
(id)Fill Missing Orientations Groups
from_arrays
(x, y, z, G_x, G_y, G_z, names[, ...])Create an OrientationsTable from arrays.
Get orientations by ID.
Get orientations grouped by ID.
get_orientations_by_name
(name)Get orientations by name.
initialize_empty
()Attributes
df
The custom data type for the data array.
Get the gradient components.
Get a view of the gradient components.
id
Get the IDs.
model_transform
A mapping between orientation names and ids.
Get the nugget values.
Get the XYZ coordinates.
Get a view of the XYZ coordinates.
A structured NumPy array holding the X, Y, Z coordinates, gradients G_x, G_y, G_z, id, and nugget of each orientation.
- data: ndarray¶
A structured NumPy array holding the X, Y, Z coordinates, gradients G_x, G_y, G_z, id, and nugget of each orientation.
- name_id_map: dict[str, int] | None = None¶
A mapping between orientation names and ids.
- dt = dtype([('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('G_x', '<f8'), ('G_y', '<f8'), ('G_z', '<f8'), ('id', '<i4'), ('nugget', '<f8')])¶
The custom data type for the data array.
- classmethod from_arrays(x: ndarray, y: ndarray, z: ndarray, G_x: ndarray, G_y: ndarray, G_z: ndarray, names: Sequence | str, nugget: ndarray | None = None, name_id_map: dict[str, int] | None = None) OrientationsTable [source]¶
Create an OrientationsTable from arrays.
- Parameters:
x (np.ndarray) – Array of x-coordinates.
y (np.ndarray) – Array of y-coordinates.
z (np.ndarray) – Array of z-coordinates.
G_x (np.ndarray) – Array of x-components of the gradients.
G_y (np.ndarray) – Array of y-components of the gradients.
G_z (np.ndarray) – Array of z-components of the gradients.
names (Union[Sequence[str], str]) – Sequence of names corresponding to each orientation.
nugget (Optional[np.ndarray]) – Array of nugget values. If None, defaults are used.
name_id_map (Optional[dict[str, int]]) – Mapping between names and ids.
- Returns:
The created OrientationsTable.
- Return type:
- property xyz: ndarray¶
Get the XYZ coordinates.
- Returns:
The XYZ coordinates.
- Return type:
np.ndarray
- property xyz_view: ndarray¶
Get a view of the XYZ coordinates.
- Returns:
A view of the XYZ coordinates.
- Return type:
np.ndarray
- property grads: ndarray¶
Get the gradient components.
- Returns:
The gradient components.
- Return type:
np.ndarray
- property grads_view: ndarray¶
Get a view of the gradient components.
- Returns:
A view of the gradient components.
- Return type:
np.ndarray
- property nugget: ndarray¶
Get the nugget values.
- Returns:
The nugget values.
- Return type:
np.ndarray
- property ids: ndarray¶
Get the IDs.
- Returns:
The IDs.
- Return type:
np.ndarray
- get_orientations_by_name(name: str) OrientationsTable [source]¶
Get orientations by name.
- Parameters:
name (str) – The name of the orientations.
- Returns:
The orientations corresponding to the given name.
- Return type:
- get_orientations_by_id(id: int) OrientationsTable [source]¶
Get orientations by ID.
- Parameters:
id (int) – The ID of the orientations.
- Returns:
The orientations corresponding to the given ID.
- Return type:
- get_orientations_by_id_groups() list[OrientationsTable] [source]¶
Get orientations grouped by ID.
- Returns:
A list of OrientationsTable objects, each corresponding to a unique ID.
- Return type:
list[OrientationsTable]
- classmethod fill_missing_orientations_groups(orientations_groups: list[OrientationsTable], surface_points_groups: list[SurfacePointsTable]) list[OrientationsTable] [source]¶
Fill Missing Orientations Groups
Fills in missing orientations in a list of orientations groups based on a list of surface points.
Args:
- __init__(data: ndarray, name_id_map: dict[str, int] | None = None, _model_transform: Transform | None = None) None ¶